package com.hhkj.admin.train.service.base.impl;

import com.hhkj.admin.train.domain.Train;
import com.hhkj.admin.train.mapper.TrainMapper;
import com.hhkj.admin.train.model.dopo.TrainCountPo;
import com.hhkj.admin.train.model.dopo.TrainDo;
import com.hhkj.admin.train.model.dopo.TrainPo;
import com.hhkj.admin.train.service.base.TrainService;
import com.ruoyi.common.base.biz.service.base.BaseServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 培训练习Service业务层处理
 *
 * @author ruoyi
 * @since 2023-05-24
 */
@Service
public class TrainServiceImpl
        extends BaseServiceImpl<Train, TrainDo, TrainPo, TrainMapper>
        implements TrainService {

    @Override
    public List<TrainPo> listLastTrainByStudentIdListAndCourseIdList(List<Long> studentIdList, List<Long> courseIdList) {
        return this.getBaseMapper().listLastTrainByStudentIdListAndCourseIdList(studentIdList, courseIdList);
    }

    @Override
    public List<TrainCountPo> listCountByStudentIdListAndCourseIdList(List<Long> studentIdList, List<Long> courseIdList) {
        return this.getBaseMapper().listCountByStudentIdListAndCourseIdList(studentIdList, courseIdList);
    }

    @Override
    public List<TrainPo> listByStudentIdListAndCourseIdList(List<Long> studentIdList, List<Long> courseIdList) {
        return this.getBaseMapper().listByStudentIdListAndCourseIdList(studentIdList, courseIdList);
    }

    @Override
    public TrainPo getPoById(Long id) {
        return this.getBaseMapper().getPoById(id);
    }

    @Override
    public Train getLastTrainPoByDo(Train conditionDo) {
        return this.getBaseMapper().getLastTrainPoByDo(conditionDo);
    }

    @Override
    public Train getLastTrainByDo(Train conditionDo) {
        return this.getBaseMapper().getLastTrainByDo(conditionDo);
    }

    /**
     * 查询培训练习列表
     *
     * @param train 培训练习
     * @return 培训练习
     */
    @Override
    public List<Train> selectTrainList(Train train) {
        return getBaseMapper().selectTrainListByDo(train);
    }

    /**
     * 根据条件查询学员培训信息
     *
     * @param trainDo 传参
     */
    @Override
    public List<Train> listStudentTrainListPoByDo(TrainDo trainDo) {
        return getBaseMapper().listStudentTrainListPoByDo(trainDo);
    }
}
